package com.yh.autobio.modules.bean;

import com.yh.autobio.R;
import com.yh.autobio.fragment.ADDBackMatFragment;
import com.yh.autobio.fragment.ADDSaleOutFragment;
import com.yh.autobio.fragment.AboutZWScanFragment;
import com.yh.autobio.fragment.BackMatFragment;
import com.yh.autobio.fragment.BackMatListFragment;
import com.yh.autobio.fragment.ChangePwdFragment;
import com.yh.autobio.fragment.CustPhoneListFragment;
import com.yh.autobio.fragment.InvoiceDetailFragment;
import com.yh.autobio.fragment.InvoiceFragment;
import com.yh.autobio.fragment.InvoiceProductFragment;
import com.yh.autobio.fragment.Ip_Fragment;
import com.yh.autobio.fragment.Ip_port_Fragment;
import com.yh.autobio.fragment.MatOrGiftJPageFragment;
import com.yh.autobio.fragment.PackingDetailFragment;
import com.yh.autobio.fragment.PackingListFragment;
import com.yh.autobio.fragment.SalaryRepotFragment;
import com.yh.autobio.fragment.SaleOutListFragment;
import com.yh.autobio.fragment.TeamFragment;
import com.yh.autobio.fragment.Web_Fragment;
import com.yh.autobio.fragment.WorkReportFragment;

public enum SimpleBackPage {
    ABOUT_ZWS(1, R.string.about, AboutZWScanFragment.class),
    WORK_DETAIL(2, R.string.about, WorkReportFragment.class),
    TEAM(7, R.string.myTeam, TeamFragment.class),
    SALARYREPORT(15, R.string.about, SalaryRepotFragment.class),
//    SALE_OUT(17, R.string.about, SaleOutFragment.class),
    CUST_PHEON(18, R.string.about, CustPhoneListFragment.class),
    GIFORMAT(19, R.string.about, MatOrGiftJPageFragment.class),
    BACKMAT(20, R.string.about, BackMatFragment.class),
    BACKMATLIST(21, R.string.about, BackMatListFragment.class),
    SALE_OUT_LIST(22, R.string.about, SaleOutListFragment.class),
    ADD_BACK_MAT(23, R.string.about, ADDBackMatFragment.class),
    ADD_SALE_OUT(24, R.string.about, ADDSaleOutFragment.class),
    CHANGE_PWD(25, R.string.about, ChangePwdFragment.class),
    INVOICE(26, R.string.about, InvoiceFragment.class),
    INVOICEDETAIL(27, R.string.about, InvoiceDetailFragment.class),
    INVOICEPRO(28, R.string.about, InvoiceProductFragment.class),
    PACKINGLIST(29, R.string.about, PackingListFragment.class),
    PACKINGDETAIL(30, R.string.about, PackingDetailFragment.class),
    IP_PORT(31, R.string.about, Ip_port_Fragment.class),
    IP(32, R.string.about, Ip_Fragment.class),
    WEB(33, R.string.about, Web_Fragment.class),
        ;

    private int title;
    private Class<?> clz;
    private int value;

    private SimpleBackPage(int value, int title, Class<?> clz) {
        this.value = value;
        this.title = title;
        this.clz = clz;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static SimpleBackPage getPageByValue(int val) {
        for (SimpleBackPage p : values()) {
            if (p.getValue() == val)
                return p;
        }
        return null;
    }
}
